package net.adetech.crj.dao;

import com.jfinal.plugin.activerecord.Model;

import java.util.List;

public class DataDictionary extends Model<DataDictionary> {
    public static final DataDictionary dao = new DataDictionary().dao();

    public static List<DataDictionary> getDDList(String noOrName) {
        String sql = "select * from CRJ_DATA_DICTIONARY where DD_NO = ? order by DD_ORDER ";
        try {
            int no = Integer.parseInt(noOrName);
        } catch (Exception e) {
            sql = "select * from CRJ_DATA_DICTIONARY where DD_NAME = ? order by DD_ORDER ";
        }
        List<DataDictionary> dictionaryList = dao.find(sql, noOrName);

        return dictionaryList;
    }

}
